package org.teremail;

import javax.sql.DataSource;

import org.h2.jdbcx.JdbcDataSource;
import org.teremail.schema.Dialect;
import org.teremail.schema.H2Dialect;

public class H2DBConfig extends AbstractDBConfig {
    
    private final String url;
    
    public H2DBConfig(String url) {
        this.url = url;
    }

    public DataSource loadDS() {
        JdbcDataSource ds = new JdbcDataSource();
        ds.setURL(url);
        return ds;
    }

    public Dialect getDialect() {
        return H2Dialect.getInstance();
    }

}
